import Vue from 'vue'
// import 'element-ui/lib/theme-chalk/index.css'
import '@/framework/utils/settingTheme.js' // 自定义main引入文件
import Cookies from 'js-cookie'
import 'normalize.css/normalize.css' // A modern alternative to CSS resets
import ElementUI from 'element-ui'
// import locale from 'element-ui/lib/locale/lang/en' // lang i18n
// import i18n from '@/framework/lang' // internationalization

import '@/framework/styles/index.scss' // framework global css
import '@/styles/index.scss' // global css

import '@/framework/assets/icons' // icon
import '@/permission' // permission control

// import 'e-icon-picker/lib/symbol.js' // 基本彩色图标库
// import 'e-icon-picker/lib/index.css' // 基本样式，包含基本图标
// import 'font-awesome/css/font-awesome.min.css' // font-awesome 图标库
// import 'element-ui/lib/theme-chalk/icon.css' // element-ui 图标库

import { customComponents } from '@/framework/components/index.js'

/**
 * If you don't want to use mock-server
 * you want to use MockJs for mock api
 * you can execute: mockXHR()
 *
 * Currently MockJs will be used in the production environment,
 * please remove it before going online ! ! !
 */
// if (process.env.NODE_ENV === 'development') {
//   const { mockXHR } = require('@/framework/mock')
//   mockXHR()
// }

// set ElementUI lang to EN
// Vue.use(ElementUI, { locale })
// 如果想要中文版 element-ui，按如下方式声明
// Vue.use(ElementUI)

customComponents() // 初始化自定义组件

// 多语言版本
Vue.use(ElementUI, {
  size: Cookies.get('size') || 'medium' // set element-ui default size
  // i18n: (key, value) => i18n.t(key, value)
})
